home *** CD-ROM | disk | FTP | other *** search
- onClipEvent(enterFrame){
- if(_parent.move_play)
- {
- if(ishit)
- {
- if(this.hit.hitTest(_parent.hero.Hit))
- {
- _parent.canPlay = false;
- _parent.player_move = false;
- _parent.hero.gotoAndStop("die");
- }
- g += _parent.GGG;
- this._x += speedX;
- sn = Math.abs(Math.cos(3.141592653589793 * g / 180));
- this._y = 430 - this._height / 2 - sn * distance;
- if(this.hitTest(_parent.hit_L))
- {
- trace("hitLLLLLLLLLLLLLLL");
- speedX = 5 + zzz_num;
- }
- if(this.hitTest(_parent.hit_R))
- {
- trace("hitRRRRRRRRRR");
- speedX = -5 + (- zzz_num);
- }
- }
- }
- if(Att_hit)
- {
- if(this.hitTest(_parent.arrow_1.hit))
- {
- ishit = false;
- _parent.arrow_1.gotoAndStop(1);
- _parent.mball2._x = this._x + 50;
- _parent.mball1._x = this._x - 50;
- this.play();
- }
- if(this.hitTest(_parent.arrow_2.hit))
- {
- ishit = false;
- _parent.arrow_2.gotoAndStop(1);
- _parent.mball2._x = this._x + 50;
- _parent.mball1._x = this._x - 50;
- this.play();
- }
- if(this.hitTest(_parent.arrow_3.hit))
- {
- ishit = false;
- _parent.arrow_3.gotoAndStop(1);
- _parent.mball2._x = this._x + 50;
- _parent.mball1._x = this._x - 50;
- this.play();
- }
- if(this.hitTest(_parent.arrow_4.hit))
- {
- ishit = false;
- _parent.arrow_4.gotoAndStop(1);
- _parent.mball2._x = this._x + 50;
- _parent.mball1._x = this._x - 50;
- this.play();
- }
- if(this.hitTest(_parent.arrow_5.hit))
- {
- ishit = false;
- _parent.arrow_5.gotoAndStop(1);
- _parent.mball2._x = this._x + 50;
- _parent.mball1._x = this._x - 50;
- this.play();
- }
- if(this.hitTest(_parent.arrow_7.hit))
- {
- ishit = false;
- _parent.arrow_7.gotoAndStop(1);
- _parent.mball2._x = this._x + 50;
- _parent.mball1._x = this._x - 50;
- this.play();
- }
- if(this.hitTest(_parent.arrow_8.hit))
- {
- ishit = false;
- _parent.arrow_8.gotoAndStop(1);
- _parent.mball2._x = this._x + 50;
- _parent.mball1._x = this._x - 50;
- this.play();
- }
- }
- }
-